<template>
  <toast></toast>

  <router-view></router-view>
</template>

<script type="text/babel">
  import store from './store'
  import toast from './components/toast.vue'

  export default {
    components: {
      toast
    },
    store,
    data(){
      return {
        topNav: window.isWsdk
      }
    },

    created(){
      wsdk.changeRefresh(false);

      if (bridge.isWsdk && bridge.isAndroid) {
        require.ensure(['!style!css!less!../static/less/android.less'], function (require) {
          require('!style!css!less!../static/less/android.less');
        });
      }

      this.$on('toast',  (content) =>{
        this.$broadcast('toast', content);
      });
    }
  }
</script>

<style lang="less">
  @import '../static/less/index.less';
</style>
